<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@taglib prefix="mvc" uri="http://www.springframework.org/tags/form" %>
<%@taglib prefix="fmt" uri="http://www.springframework.org/tags" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>



<!DOCTYPE html>
<!--[if IE 6 ]> <html class="ie6 lte_ie6 lte_ie7 lte_ie8 lte_ie9"> <![endif]-->
<!--[if lte IE 6 ]> <html class="lte_ie6 lte_ie7 lte_ie8 lte_ie9"> <![endif]-->
<!--[if lte IE 7 ]> <html class="lte_ie7 lte_ie8 lte_ie9"> <![endif]-->
<!--[if lte IE 8 ]> <html class="lte_ie8 lte_ie9"> <![endif]-->
<!--[if lte IE 9 ]> <html class="lte_ie9"> <![endif]-->
<!--[if (gte IE 10)|!(IE)]><!--><html><!--<![endif]-->
<head>
    <title>新建学习经历信息</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=10,chrome=1" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">

    <link rel="stylesheet" href="/lib/laydate/need/laydate.css">
    <link rel="stylesheet" type="text/css" href="../../css/style.css" />
    <script type="text/javascript" src="../js/news/jquery-1.9.1.js"></script>
    <script src="/lib/jQuery-File-Upload-master/jquery.ui.widget.js" type="text/javascript" charset="utf-8"></script>
    <script src="/lib/jQuery-File-Upload-master/jquery.iframe-transport.js" type="text/javascript" charset="utf-8"></script>
    <script src="/lib/jQuery-File-Upload-master/jquery.fileupload.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../js/news/page.js"></script>
    <script src="/lib/laydate/laydate.js"></script>
    <script src="../../js/base/base.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../lib/pagination/js/jquery.pagination.min.js" type="text/javascript" charset="utf-8"></script>

    <script src="/js/ajaxupload.js" type="text/javascript" charset="utf-8"></script>
    <%--<script type="text/javascript" src="/js/common/fileupload.js"></script>--%>

    <script type="text/javascript" >
        var MYOA_JS_SERVER = "";
        var MYOA_STATIC_SERVER = "";
    </script>

    <style>

        body{
            font-size: 15px;
            font-family: 微软雅黑;
        }

        .TableBlock .TableData td, .TableBlock td.TableData {
            background: #FFFFFF;
            border-bottom: none;
            border-right: none;
            padding: 3px;
        }
        .big3{
            margin-left: 5px;
            font-family: Microsoft yahei,Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif;
            margin-top: -3px;
            margin-right: 40px;
            font-size: 22px;
            color: #494d59;
            font-weight: inherit;
        }


        .btn_ .btn_style {
            background: url("../../img/save.png") no-repeat;
        }
        #rs {
            display: inline-block;
            float: left;
            width: 66px;
            height: 30px;
            text-align: center;
            margin-top: 10px;
            margin-bottom: 20px;
            padding-left: 23px;
            padding-top: 7px;
            cursor: pointer;
            font-size: 14px;
            background: url("../../img/publish.png") no-repeat;
            margin-left: 40%;
        }
        .TableData{
            font-size: 14px;
            color: #2a588c;
            /*   font-weight: bold;*/
        }
        .TableBlock tbody tr{
            height: 52px;
        }
        .TableBlock tbody tr td{
            border: 1px solid #c0c0c0;
        }
        .TableBlock{
            border: 1px #124164 solid;
        }


        .TableBlock tr td:first-of-type,table tr td:nth-child(3){
            text-align: right;
        }
        .div_1{
            margin-left: 20px;
        }
        .newClass{
            float: right;
            width: 90px;
            height: 28px;
            background: #2b7fe0!important;;
            color: #fff;
            font-size: 14px;
            line-height: 28px;
            margin-right: 80px;
            cursor: pointer;
            border-radius: 5px;
        }
        .div_1 {
            margin-left: 20px;
            float: left;
        }
        input{
            float: none;
        }
        .editAndDelete3{
            color: red;
        }
        .bar {
            height: 18px;
            background: green;
        }
    </style>
</head>


<script type="text/javascript">

</script>

<body class="bodycolor" topmargin="5">
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
    <tr>
        <td>
            <div class="div_1">
                <img src="/img/commonTheme/${sessionScope.InterfaceModel}/notify_new.png" align="absmiddle"><span class="big3">新建学习经历信息</span>&nbsp;&nbsp;
            </div>
            <div class="newClass" id="newClass" style="display: block;">
            <span style="margin-left: 30px;">
                <%--<img style="margin-right: 4px;margin-left: -11px;margin-bottom: 2px;" src="../../img/mywork/newbuildworjk.png" alt="">--%>
                返回
            </span>
            </div>
        </td>
    </tr>
</table>
<br>
<form enctype="multipart/form-data" action=""  method="post" id="form1" name="form1" onSubmit="return CheckForm();">
    <table class="TableBlock" width="90%" align="center">

        <tr>
            <td nowrap class="TableData"><span style="color: red;font-size: 16px;">*</span>单位员工：</td>
            <td class="TableData">
                <input type="text" id="userId" name="userId" style="width: 158px;height:28px;" size="12" class="BigStatic" readonly value="">&nbsp;
                <a href="javascript:;" id="departAdd" class="departAdd" ><fmt:message code="global.lang.select" /></a>
            </td>
            <td nowrap class="TableData">所学专业：</td>
            <td class="TableData">
                <input type="text" id="profession" style="width: 158px;height:28px;" name="profession" size="12" maxlength="10" class="BigInput" value=""/>
            </td>
        </tr>

        <tr>
            <td nowrap class="TableData">开始日期：</td>
            <td class="TableData">
                <input type="text" id="startTime" style="width: 158px;height:28px;" name="startTime" size="12" maxlength="10" class="BigInput" value="" onclick="laydate({istime: true, format: 'YYYY-MM-DD'})"/>
            </td>

            <td nowrap class="TableData">结束日期：</td>
            <td class="TableData">
                <input type="text" id="endTime" style="width: 158px;height:28px;" name="endTime" size="12" maxlength="10" class="BigInput" value="" onclick="laydate({istime: true, format: 'YYYY-MM-DD'})"/>
            </td>
        </tr>

        <tr>
            <td nowrap class="TableData">所获学历：</td>
            <td class="TableData">
                <select name="academic" id="academic" style="background: white; width:170px;height: 28px;" title="">
                  <option value=""><fmt:message code="hr.th.PleaseSelect" /></option>
                    <%-- <option value="1">小学</option>
                   <option value="2">初中</option>
                   <option value="3">高中</option>
                   <option value="4">中专</option>
                   <option value="5">大专</option>
                   <option value="6">本科</option>
                   <option value="7">研究生</option>
                   <option value="8">博士</option>
                   <option value="9">博士后</option>
                   <option value="10">技校</option>--%>
                </select>
            </td>
            <td nowrap class="TableData">所获学位：</td>
            <td class="TableData">
                <select name="degree" style="background: white;width: 170px;height:28px;" id="degree" title="">
                  <%--  <option value=""><fmt:message code="hr.th.PleaseSelect" /></option>--%>
                    <%--  <option value="1">博士后</option>
                    <option value="2">博士</option>
                    <option value="3">MBA</option>
                    <option value="4">硕士</option>
                    <option value="5">双学士</option>
                    <option value="6">学士</option>
                    <option value="7">无</option>--%>
                </select>
            </td>
        </tr>
        <tr>
            <td nowrap class="TableData">曾任班干：</td>
            <td class="TableData">
                <input type="text" id="classcadre" style="width: 158px;height:28px;" name="classcadre" size="12" maxlength="10" class="BigInput" value=""/>
            </td>

            <td nowrap class="TableData">证明人：</td>
            <td class="TableData">
                <input type="text" id="certifier" style="width: 158px;height:28px;" name="certifier" size="12" maxlength="10" class="BigInput" value=""/>
            </td>
        </tr>


        <tr>
            <td nowrap class="TableData">所在院校：</td><%--备注--%>
            <td class="TableData" colspan=3>
                <textarea name="university" id="university" cols="84" rows="3" class="BigInput" value=""></textarea>
            </td>
        </tr>
        <tr>
            <td nowrap class="TableData">院校所在地：</td><%--备注--%>
            <td class="TableData" colspan=3>
                <textarea name="universityLocation" id="universityLocation" cols="84" rows="3" class="BigInput" value=""></textarea>
            </td>
        </tr>
        <tr>
            <td nowrap class="TableData">获奖情况：</td><%--备注--%>
            <td class="TableData" colspan=3>
                <textarea name="honor" id="honor" cols="84" rows="3" class="BigInput" value=""></textarea>
            </td>
        </tr>
        <tr>
            <td nowrap class="TableData">所获证书：</td><%--备注--%>
            <td class="TableData" colspan=3>
                <textarea name="certificate" id="certificate" cols="84" rows="3" class="BigInput" value=""></textarea>
            </td>
        </tr>

        <tr>
            <td nowrap class="TableData">备注：</td><%--备注--%>
            <td class="TableData" colspan=3>
                <textarea name="remark" id="remark" cols="84" rows="3" class="BigInput" value=""></textarea>
            </td>
        </tr>
        <%--<tr>--%>
            <%--<td nowrap class="TableData">附件上传：</td>&lt;%&ndash;备注&ndash;%&gt;--%>
            <%--<td class="TableData" colspan=3>--%>
                <%--&lt;%&ndash;<textarea name="remark" id="remark" cols="84" rows="3" class="BigInput" value=""></textarea>&ndash;%&gt;--%>
            <%--</td>--%>
        <%--</tr>--%>
        <tr>
            <td class="blue_text TableData">
                附件文档：
            </td>
            <td colspan=3 class="files TableData" id="files_txt">
            </td>
        </tr>
        <tr>
              <td nowrap class="TableData">附件上传：</td>
              <td colspan=3 style="text-align: left">
                  <forms id="uploadimgform" style="float: left;" target="uploadiframe"  action="/upload?module=hr"  method="post" >
                      <input type="file" multiple="multiple" name="file"  id="uploadinputimg"  class="w-icon5" style="position: absolute;opacity: 0;width: 70px;filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0)">
                      <a href="#" id="uploadimg"><img style="margin-right:5px;" src="/img/icon_uplod.png"/><fmt:message code="global.th.fileup" /></a>
                  </forms>
                  <div id="progress" style="width: 200px;float: left;margin-left: 10px;margin-top: 2px;">
                      <div class="bar" style="width: 0%;"></div>
                  </div>
                  <div class="barText" style="float: left;margin-left: 10px;"></div>
              </td>
          </tr>

        <tr align="center" class="TableControl">
            <td colspan=4 nowrap>
                <div id="rs" type="save" class="btn_style btn_ok"><fmt:message code="global.lang.save" /></div><%--保存--%>
            </td>
        </tr>
    </table>
</form>
<script type="text/javascript">
    var type = $.GetRequest().type;
    var userId= decodeURI($.GetRequest().userId);
    //返回
    $(document).on('click','.newClass',function () {
        if(type!=undefined){
            $(window.parent.document).find('.main').find('iframe').prop('src','/learningExperience/LearningExperienceManager?type=1&userId='+userId)
        }else{
            $(window.parent.document).find('.main').find('iframe').prop('src','/learningExperience/LearningExperienceManager')
        }

    })
    var user_id;
    var depart_id;
    //时间控件调用
    var start = {
        format: 'YYYY-MM-DD',
        /* min: laydate.now(), //设定最小日期为当前日期*/
        /* max: '2099-06-16 23:59:59', //最大日期*/
        istime: true,
        istoday: false,
        choose: function(datas){
            end.min = datas; //开始日选好后，重置结束日的最小日期
            end.start = datas //将结束日的初始值设定为开始日
        }
    };
    var end = {
        format: 'YYYY-MM-DD',
        /*min: laydate.now(),*/
        /*max: '2099-06-16 23:59:59',*/
        istime: true,
        istoday: false,
        choose: function(datas){
            start.max = datas; //结束日选好后，重置开始日的最大日期
        }
    };
    function selectNumber(name,val){
        var numbers = $("select[name="+name+"]").find("option"); //获取select下拉框的所有值

        for (var j = 1; j < numbers.length; j++) {
            if ($(numbers[j]).val() == val) {
                $(numbers[j]).attr("selected", "selected");
            }
        }
    }
    var typeHr=getQueryString('typeHr');
    $(function () {
        if(typeHr == '1'){
            $('#newClass').hide();
        }else{
            $('#newClass').show();
        }
//        获取编辑id回显数据
        var id=$.getQueryString('id');
        if(!id){
            $.ajax({  //填充学历下拉框
                type:'get',
                url:'/learningExperience/getHrCodes',
                dataType:'json',
                data:{type:'edu'},
                success:function(res){
                    if(res.flag) {
                        var lists = res.data;
                        var render = [];
                        render.push("<option value=''><fmt:message code='hr.th.PleaseSelect' /></option>")
                        for(var i=0;i<lists.length;i++){
                            render.push("<option value=\""+lists[i].codeNo+"\">"+lists[i].codeName+"</option>");
                        }
                        $("#academic").html(render.join(""));
                    }

                }
            })
            $.ajax({  //填充学位下拉框
                type:'get',
                url:'/learningExperience/getHrCodes',
                dataType:'json',
                data:{type:'degree'},
                success:function(res){
                    if(res.flag) {
                        var lists = res.data;
                        var render = [];
                        render.push("<option value=''><fmt:message code='hr.th.PleaseSelect' /></option>")
                        for(var i=0;i<lists.length;i++){
                            render.push("<option value=\""+lists[i].codeNo+"\">"+lists[i].codeName+"</option>");
                        }
                        $("#degree").html(render.join(""));
                    }

                }
            })
        }
        if(id){
            $(document).attr('title','修改学习经历信息');
            $('#big3').html('修改学习经历信息');
            $.ajax({
                url: "<%=basePath%>/learningExperience/getLerningExperienceById",
                type: "get",
                data: {
                    'id': id
                },
                dataType: 'json',
                success: function (obj) {
                    var data=obj.data;

                    var arr = data.attachmentList;
                    var str1=""
                    if (data.attachmentList != '') {
                        for (var i = 0; i < (arr.length); i++) {
                            str1+='<div class="dech" deUrl="'+encodeURI(arr[i].attUrl)+'" style="display:block;"><a class="ATTACH_a" NAME="'+arr[i].attachName+'*" href="<%=basePath %>download?'+encodeURI(arr[i].attUrl)+'">'+arr[i].attachName+'</a><img class="deImgs" style="margin-left:5px;cursor: pointer;" src="../img/file/icon_deletecha_03.png"/><input type="hidden" NAME="'+arr[i].attachName+'*"  class="inHidden" value="'+arr[i].aid+'@'+arr[i].ym+'_'+arr[i].attachId+',"></div>';
                        }
                        $('#files_txt').append(str1);
                    };

                    $('#userId').attr('user_id',data.userId);
                    $('#userId').val(data.userName);
                    $('#profession').val(data.profession);
                    $('#startTime').val(data.startTime);
                    $('#endTime').val(data.endTime);
//                    selectNumber('academic',data.academic)
//                    selectNumber('degree',data.degree)
                    $('#classcadre').val(data.classcadre);
                    $('#certifier').val(data.certifier);
                    $('#university').val(data.university);

                    $('#universityLocation').val(data.universityLocation);
                    $('#honor').val(data.honor);
                    $('#certificate').val(data.certificate);

                    $('#remark').val(data.remark);



                    $.ajax({  //填充学历下拉框
                        type:'get',
                        url:'/learningExperience/getHrCodes',
                        dataType:'json',
                        data:{type:'edu'},
                        success:function(res){
                            if(res.flag) {
                                var lists = res.data;
                                var render = [];
                                render.push("<option value=''><fmt:message code='hr.th.PleaseSelect' /></option>")
                                for(var i=0;i<lists.length;i++){
                                    render.push("<option value=\""+lists[i].codeNo+"\">"+lists[i].codeName+"</option>");
                                }
                                $("#academic").html(render.join(""));
                                selectNumber('academic',data.academic)

                            }

                        }
                    })
                    $.ajax({  //填充学位下拉框
                        type:'get',
                        url:'/learningExperience/getHrCodes',
                        dataType:'json',
                        data:{type:'degree'},
                        success:function(res){
                            if(res.flag) {
                                var lists = res.data;
                                var render = [];
                                render.push("<option value=''><fmt:message code='hr.th.PleaseSelect' /></option>")
                                for(var i=0;i<lists.length;i++){
                                    render.push("<option value=\""+lists[i].codeNo+"\">"+lists[i].codeName+"</option>");
                                }
                                $("#degree").html(render.join(""));
                                selectNumber('degree',data.degree)

                            }

                        }
                    })
                }
            });

            $('#rs').attr('type','edit')
        }else{
            if(type!=undefined){
                $('#userId').val(parent.userName+',');
                $('#userId').attr('user_id',userId+',');
                $('#userId').attr('dataId',userId+',');
                $('#userId').attr('userName',parent.userName+',');
            }
        }


        //选择单位员工
        $('#departAdd').click(function(){
            user_id="userId";
            $.popWindow("../../common/selectUser?0");
        })

        //清空
        $('.orgDepartClear').click(function(){
            $('#joinDept').attr("dataid","");
            $('#joinDept').attr("depart_id","");
            $('#joinDept').attr("deptname","");
            $('#joinDept').val("");
        })

        // 清空
        $('.orgUserClear').click(function(){
            $('#joinPerson').attr("dataid","");
            $('#joinPerson').attr("user_id","");
            $('#joinPerson').attr("userprivname","");
            $('#joinPerson').attr("username","");
            $('#joinPerson').val("");
        });

        function CheckForm(){
            if($('#planNo').val()==''){
                layer.msg('<fmt:message  code="event.th.PlanNull"/>',{icon:2});
                return false;
            }
            if($('#planName').val()==''){
                layer.msg('<fmt:message  code="event.th.PlanEmpty"/>',{icon:2});
                return false;
            }
            if($('#assessingOfficer').val()==''){ //审批人不能为空
                layer.msg('<fmt:message  code="withdraw.th.shenpi"/>',{icon:2});
                return false;
            }
            return true;
        }

        fileuploadFn('#uploadinputimg',$('#files_txt'));

        //附件上传 方法
        var timer=null;
        function fileuploadFn(formId,element) {
                        $('#form1').attr('action','../upload?module=hr')

            // $('#uploadinputimg').fileupload({
            $(formId).fileupload({
                dataType:'json',
                progressall: function (e, data) {
                    var progress = parseInt(data.loaded / data.total * 100, 10);
                    $('#progress .bar').css(
                        'width',
                        progress + '%'
                    );
                    $('.barText').html(progress + '%');
                    if(progress >= 100){  //判断滚动条到100%清除定时器
                        timer=setTimeout(function () {
                            $('#progress .bar').css(
                                'width',
                                0 + '%'
                            );
                            $('.barText').html('');
                        },2000);

                    }
                },
                done: function (e, data) {
                    if(data.result.obj != ''){
                        var data = data.result.obj;
                        var str = '';
                        var str1 = '';
                        for (var i = 0; i < data.length; i++) {
                            var gs = data[i].attachName.split('.')[1];
                            if(gs == 'jsp'||gs == 'css'||gs == 'js'||gs == 'html'||gs == 'java'||gs == 'php' ){ //后缀为这些的禁止上传
                                str += '';
                                layer.alert('jsp、css、js、html、java文件禁止上传!',{},function(){
                                    layer.closeAll();
                                });
                            }else{
                                str += '<div class="dech" deUrl="' + encodeURI(data[i].attUrl)+ '"><a href="<%=basePath %>download?'+encodeURI(data[i].attUrl)+'" NAME="' + data[i].attachName + '*"><img style="margin-right:10px;" src="/img/attachment_icon.png"/>' + data[i].attachName + '</a><img class="deImgs" style="margin-left:5px;cursor: pointer;" src="/img/file/icon_deletecha_03.png"/><input type="hidden" class="inHidden" value="' + data[i].aid + '@' + data[i].ym + '_' + data[i].attachId + ',"></div>';
                            }
                        }
                        // $('.Attachment td').eq(1).append(str);
                        element.append(str);
                    }else{
                        layer.alert('添加附件大小不能为空!',{},function(){
                            layer.closeAll();
                        });
                    }
                }
            });
        }

        $('#query_uploadArr').on('click','.deImgs',function(){
            var data=$(this).parents('.dech').attr('deUrl');
            var dome=$(this).parents('.dech');
            deleteChatment(data,dome);
        })


        //附件删除
        $('#files_txt').on('click','.deImgs',function(){
            var data=$(this).parents('.dech').attr('deUrl');
            var dome=$(this).parents('.dech');
            deleteChatment(data,dome);
        })

        //删除附件
        function deleteChatment(data,element){

            layer.confirm('<fmt:message code="menuSSetting.th.isdeleteMenu" />？', {/*确定要删除吗*/
                btn: ['<fmt:message code="global.lang.ok" />','<fmt:message code="depatement.th.quxiao" />'], //按钮 /* 确定  取消*/
                title:'<fmt:message code="notice.th.DeleteAttachment" />'/*删除附件*/
            }, function(){
                //确定删除，调接口
                $.ajax({
                    type:'get',
                    url:'../delete',
                    dataType:'json',
                    data:data,
                    success:function(res){

                        if(res.flag == true){
                            layer.msg('<fmt:message code="workflow.th.delsucess" />', { icon:6});/*删除成功*/
                            element.remove();
                        }else{
                            layer.msg('<fmt:message code="lang.th.deleSucess" />', { icon:6});/*删除失败*/
                        }
                    }
                });

            }, function(){
                layer.closeAll();
            });
        }

        // 提交表单
        $("#rs").click(function(){
            $('#form1').attr('action','')
            var fileId=''
            var fileName=''
            if(CheckForm())
            {
                for(var i=0;i<$('.inHidden').length;i++){
                    fileId += $('.inHidden').eq(i).val();
                    fileName += $('.inHidden').eq(i).attr('name');
                }
                var data = {
//                    assessingStatus:0,
                    "attachmentId":fileId,
                    "attachmentName":fileName,
                    userId: $('#userId').attr('user_id'),
                    profession: $('#profession').val(),
                    startTime: $('#startTime').val(),
                    endTime: $('#endTime').val(),
                    academic:$('#academic').val(),
                    degree: $('#degree').val(),
                    classcadre: $('#classcadre').val(),
                    certifier: $('#certifier').val(),
                    university: $('#university').val(),
                    universityLocation:$('#universityLocation').val(),
                    honor:$('#honor').val(),
                    remark:$('#remark').val(),
                    certificate:$('#certificate').val(),

                }

                var tp = $('#rs').attr('type')
                if(tp == 'save') {
                    $.ajax({
                        type: 'post',
                        url: '<%=basePath%>learningExperience/createLearningExperience',
                        dataType: 'json',
                        data: data,
                        success: function (rsp) {
                            if (rsp.flag == true) {
                                layer.msg('<fmt:message code="url.th.addSuccess" />', {icon: 1},function () {
                                    if(typeHr == '1'){
                                        window.close();
                                        window.opener.xuexiData();
                                    }else {
                                        /*添加成功*/
                                        if(type!=undefined){
                                            window.location.href = '/learningExperience/LearningExperienceManager?type=1&userId='+userId;
                                        }else{
                                            parent.location.href = '<%=basePath%>/learningExperience/navigationBar';
                                        }

                                    }
                                });

                            } else {
                                layer.msg('<fmt:message code="hr.th.AddFailed" />', {icon: 2});
                                /*添加失败*/
                            }
                        }
                    })
                } else {
                    data.id = id
                    $.ajax({
                        type: 'post',
                        url: '<%=basePath%>learningExperience/updateLearningExperience',
                        dataType: 'json',
                        data: data,
                        success: function (rsp) {
                            if (rsp.flag == true) {
                                layer.msg('修改成功', {icon: 1},function () {
                                    if(typeHr == '1'){
                                        window.close();
                                        window.opener.xuexiData();
                                    }else {
                                        if(type!=undefined){
                                            window.location.href = '/learningExperience/LearningExperienceManager?type=1&userId='+userId;
                                        }else{
                                            parent.location.href = '<%=basePath%>/learningExperience/navigationBar';
                                        }
                                    }
                                });

                            } else {
                                layer.msg('修改失败', {icon: 2});
                            }
                        }
                    })
                }

            }
        });

    });
    //获取url参数
    function getQueryString(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
        var r = window.location.search.substr(1).match(reg);
        if (r != null) return r[2];
        return '';
    }
</script>
</body>
</html>

